package com.ysh.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import lombok.Data;

/**
 *
 * @TableName offences
 */
@TableName(value ="offences")
@Data
public class Offences implements Serializable {
    /**
     * 犯罪代号
     */
    @TableField(value = "offence_code")
    private Integer offence_code;

    /**
     * 受害者 1
     */
    @TableField(value = "crime_name1")
    private String crime_name1;

    /**
     *  受害者 2
     */
    @TableField(value = "crime_name2")
    private String crime_name2;

    /**
     *  受害者 3
     */
    @TableField(value = "crime_name3")
    private String crime_name3;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Offences other = (Offences) that;
        return (this.getOffence_code() == null ? other.getOffence_code() == null : this.getOffence_code().equals(other.getOffence_code()))
            && (this.getCrime_name1() == null ? other.getCrime_name1() == null : this.getCrime_name1().equals(other.getCrime_name1()))
            && (this.getCrime_name2() == null ? other.getCrime_name2() == null : this.getCrime_name2().equals(other.getCrime_name2()))
            && (this.getCrime_name3() == null ? other.getCrime_name3() == null : this.getCrime_name3().equals(other.getCrime_name3()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getOffence_code() == null) ? 0 : getOffence_code().hashCode());
        result = prime * result + ((getCrime_name1() == null) ? 0 : getCrime_name1().hashCode());
        result = prime * result + ((getCrime_name2() == null) ? 0 : getCrime_name2().hashCode());
        result = prime * result + ((getCrime_name3() == null) ? 0 : getCrime_name3().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", offence_code=").append(offence_code);
        sb.append(", crime_name1=").append(crime_name1);
        sb.append(", crime_name2=").append(crime_name2);
        sb.append(", crime_name3=").append(crime_name3);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}
